Added if block back and it doesn't work again