fix localhost check