Fix errors for compiling succssfully.