JS arithmatic issues