Fixed "undefined variable usage" error on MacOS platform