Correct loading title header
Wait while all database queries will execute when close application