[DEV-214] fix leaks