fix issue 1046