fixed localhost bug