Fixed bad variable assignment