Pass status code correctly

This should correctly set the HTTP status code in the replies.