Wrong condition fixed.

fix #507