Fixes #247, Fixes #248