Fix variable assignation bug