fixed js errors in statements