Fix all compile time errors

- wuhu