fix app minimizing problem