Improve condition according to comment by Xavier