Javascrip fixes