fix issue 1005