better workaround for modal position bug