nwei, fix some compile errors