Fix for null reference on chaining