Fixed one issue

Now there is a memory issue
Fixed error now there is a runtime crash