Fix for issue #128 thanks to @nicklfitz