Fix: function name inside custom class is not resolved

Fix: function name inside custom class is not resolved
Fix: class name is not resolved in function