Fixed a variable initialization bug