some adjustments according position and size (but not really satisfying)