read and toJS bugs