solved bug related to function states not working due to changes on the state api