Fixed wrong status code check