fix bug dialog position in code