Bug fixes exposed by account service unit testing