set mode only if not already set