add safety checks for elm_win_center