Fix to handle non-URLs input

Hey dude, please take a look at my fix. If you like that, feel free to merge it.
Any comments/suggestions are really appreciated. Cheers!
-- Rodrigo Tolledo