Fixing issue #7 to better handle edge cases.
 Changes to be committed:
	modified:   php/pages/profile.php