fixing upg bugs..