Memory leak fixed (Matevz)