fixing Issue #1,#2