Fix typerror during removal of chats when list reaches capacity