Fix for wrong heap access types