set correct mode