ticket:92 fix few bugs