Added checking for stand-alone