fixed #2, fixed #15, fixed #19, other gui improvment