fixed nasty bug with alignment