improve queue handling in distributed environments