Fixes memory crash.