fixed some js stuff