fix bugs in boilerplate