Fix for crash on removing object.

Signed-off-by: Jared Woolston <jwoolston@tenkiv.com>