fixed issues #597, #598
Merge pull request #606 from safiyu/UIissue2

fixed issues #597, #598