prevent unhandled rejections being thrown