Forgot to send a pull request to the repo, this includes the changes I added to fix ISSUE # 391