fix wrong alignment calculation used in #25

it needs to be (% alignment) or (& alignment) -1 not (& alignment) ...