Minor bug fixed + pep8 compliance