Fix Write for variables.

Variables values now printed fine.