Fix for issue 142