Fix issue #5,#6