Fixes a memory leak when rendering text.
Minimizes asset dereferencing when deleting.
Changes order of asset deletion.
Asset deletion (by index) returns right values.