bugfixes, reworked tickets controller
bugfixes and improvements