Fixing some bugs with elasticache state