Fixed "Exception about accessing dead object"