Fix for Issues #31 and #35