Fixed several errors with TypeScript0.9.5.