Fixed a problem where inheritance whould be used with :: prefix
The defined function now works with classes