Some leaks fixed