set status code if not set