Fixed issue with if