fixed leak, still have to reenable some features (countframes)