fixed syntax javascript warnings