Restore JS to fix bug