added Casey's fix to mobile.php from ECP