XXX: Fix undeclared variables