forward port #222 to #181 - [x] done https://github.com/strongloop/loopback-boot/pull/181/commits/bed268afad43755bfc2e161b5d6b5847cca3ec17
forward port #222 to #181