Fix Issues #238 and #239