fix for state issue