fix tiny bug to see if response was successful