Fixed some wrong variable assignments
Merge pull request #477 from ravage84/1.3

Fixed some wrong variable assignments