implemented fix described at link

https://github.com/atesh/XKit/issues/144
Merge pull request #145 from LynnCo/master

implemented fix described at link