Fixed broken if