Adjusted syntax to check return values