Dialog position only correct after first call?

Dialog position only correct after first call?

I use the 1.8(rc3) UI plugin in combination with jQ 1.4.2 and i have a page with 3 different modal dialogs. To fullfill the requested redesign of the modal i need a dropshadow underneath the dialog box, which i solve by creating and positioning a box within the .ui-widget-overlay with the shadow image included. My dialogs are set autoOpen: false and when I click my calling anchor, the first time the dialog appears, it places the shadow on the right position but not the dialog. I have to close the dialog and after the next call it appears on the right position. (in that case in the center/center of the page with the shadow unterneath).

Can anyone help me with that problem, that the dialog is positioned right, only when i called and closed the specific dialog and then open it again?! Seems like the dialog isn't fast enough to use the right position at the first call.

PS: This has nothing to do with the shadow itself, the shadow just illustrates the problem.