Issue #5296 Fix dialog positioning

#5296
@redmunds found a quick fix.