fix unresponsive javascript