fix calculation of the dropdown position