matt's fixes