try to find a workaround for #1476 maximize/minimize