javascript fixes