fix logic mistake

fix logic mistake