Fix problem in error message.
Fix bug in profile where `master` was always being tested.