Improve the fw_current_url() function