compilation error fixes, still contains errors