Fixing the code and the state in the XML