Support for timeout queue, fixes for ended_at