fixed Object Oriented bugs.