Fix reference to 'state' with '_state' or 'state'.

This resolves #58.