Fixed a few return codes