Fix broken test mode checks