customized behaviour to better match Android (was ported from iOS)