Added assertion to detect non-supported modes.