Fix a bug caused by an uninitialized variable