fixed gui error, added mask creation and collapse