Added a test for the error message.
Tried to fix the twice-at-once error.