Fix for undefined function exception