fix immediates with globals and when saving non immediate values to a previous immediate