Fixed variable assignment problem introduced in last commit