minor refactoring of Queue controller
fixes count for workflows