Bug in recentlySwapped method is fixed