Bug fix: Use array keys