bug fixed in doAlign