Close #266 and #283