fixed a type change-related bug in variable dumping