Fixed #175 by accepting the patch from @lukeer