Added localhost check