fix issue 1022