Corrected inconsistency in error return values.