fixes for michael's dirty commit