fixed upgrade a bit