* fixing some js errors