Added possibility to cancel tab selection