optimization isn't safe in general. Will have to wait to move constructors. Close #515