fix bug #28,#27,#26,#23,#22