Fixed bug in overriding of status code