fixes a bug in partial alignment