Fixed #1. Issue with leaking