Fix for ReferenceError