some bug fixes for alignment extraction and an example script