hopefully fixed some leaks