Added upgrade option and fixed flickering