fixed issue #589

fixed issue #596
fixed issue #590
Merge pull request #609 from safiyu/UIissue2

fixed issue #589, #596, #590