replaced wrong return-codes with portable ones