issue #293,#296 fixed