Fixing python error