Fix problem with wrong url parsing for localhost