Fixed #1

Your work helps in my project. And I hope it can solve the crash problem :)