fixed checking for custom response code
Merge pull request #214 from masconsult/fixResponseCode2

fixed checking for custom response code