Fixed syntax error and cache global access issues