return 500 correctly