Fix error in custom 503 error logic