Fix getobs phen named param bug, improve state date handling