Response error fix

Fixed Some errors #5 from Issue queue.
I will definitely clean up the code.