Temporary fix for #107
Better fix for #107

Building on the earlier tempory fix.