main: Fixed logical error in remote/local check