Fix boilerplate js bug