removed race condition, and changed error code
Merge remote-tracking branch 'mine/temp_maid404' into temp_maid404