fix errors with TypeScript0.9.5.