Fixed the return codes.