bugfixes for TAPModel, etc