..F....... [ZBXNEXT-2398] fixed error message when deleting applications
..F....... [ZBXNEXT-2398] minor code refactoring
.......... [ZBX-8563] merge from 2.2