BUGFIX fixed logic error regarding return value parsing