Changed logic of height and position right sidebar recalculation