fixed very important error in entity selection, other various bug fixes, and output of interconnectedness of regions