Fixed issues with alignment script.