fixed upgrade script to also update with patch if applicable