tim's fixes