fix heap handle

closes #14