fixed localhost check