fixed bug with localhost