Fix IE JS parseInt issue (and tweak code indentation)