fixes of positioning, modal and safari bug