Fix bug in upgrade script for #23