fixed bug in mode var type