Fix for issue 46