Max and linux fixes