Fixed bad response(400) & PEP-8 issue

Check well before merging.