Added localmode support