Fix wrong variable assignment