Crash fixed
Code improvement