Merge "Fix argument handling in runhat() function"