Fix for #766
Merge pull request #815 from nite23/patch-11

Fix for #766