Improve condition test