Fixes a crash on deallocation

This is probably just an omission