fixing white space in js