Fixed a race condition issue with object instances using class variables instead of instance variables. Added klass callbacks.