fixed reference to main class