extra checks to handle status 500