fixed up js stuff