fix memory leak
Merge branch 'dev' of https://github.com/IvanGovnov/SPOLKS into dev