Should fix all leaks + a typo