Fixed some memory issues
Merge branch 'bug-memory-issues' into develop-with-bug-fixes