fixed last error in JS