bugfix for double free or corruption in cybin, refer to #26