fixed small js errors in code for usestrict statement