fixed some js handlers, more to do tho