small bug fix in modtools