works with 1 bug on right resize