Fix a potential crash due to improper chaining