Bugs fix and GUI improvement