Fixed errors arising from compiling CommonTools