Fixed index Keyerror
Added pull request