Make end() work on errors in beforeMain
make jshint happy
0.5.3