Fixed status code error

Fixed issue when status code 201 was returned