fixed errors with c extension.