revert back to old mobile-support code.
fix bug in get_current_url function.