- fixed possible crash bug because a variable allocated on stack was