major fix (retaining objects) and to ensure they are allocated