fixed deconstructor logic