fixed some error codes