Updated the upgrade check in profile.php and profile-case.php

with thanks to quy