Fixed syntax bugs in base classes.
Fixed build errors in some generated methods.