fix two bugs: 1st: escape category names. 2nd: do not remove timeout handler during query answering if the timeout handler has alreay been run (and thus been removed)
escape category names for admin panel
fix infinite loop