Fix deprecated 'state' calls

Changes fetching 'state' to '_state'