fixed a couple of bugs in alignzone detector