bugfix for last-mode