fix release and latest management
fix some memory leaks