Fixes #247 #248