Fixed statuscode variable to check error