fixed refs in main class