Fixed wrong if-condition.