bug fix and GUI improvement