fix critical error with stop application