fix variable initialization type conversion bug