Change behavior of tab. See #647 and #584