fix compiler warning about precedence ..
WIP: added vis code detection and automatic mode switching