Fixed status codes.
Merge pull request #417 from stevelacey/bugfix/fixed-status-codes

Fixed status codes