Fixed more compilation bugs