fixes #369, erroring out on build in more circumstances