Bugfix: Invisible tab could have been selected after statement execution