fix alignments works for most cases, todo: is there is a null alignment it breaks