fixed segfault when opening form with an empty form stack (non-MDI mode)