added fix from original repo...

too many merge conflicts, did it manually... shitty patch anyway