fixes modal javascript