#580, #581 Added options validation, selecting correct tab when tab options are invalid