fix incorrect value assignment