Handle overflow when setting registers