Fixed issue #107.

Inactive masters now get their own error message. Also tidied up
implementation.