fixed a bug where an int return value from the db was sent as the res statuscode instead of a value