Added check for modes