payment state checking fix