fix "shaky" behaviour