Fixed errors of whitespaces in javascript