improved check to run upgrade script on
updated version
fixed activation script hook