Fixed a bug. Wrong if condition.