Unstable version bug fix 3

The crash bug has been fixed. Memory leaking prevented.