Fixed a little bug on variable assignments