fixed ifstate