Fix problems found by Alexander Cherepanov in mozilla format