fix assignment issue and reenable type checking
fix nil body bug