Fix many bugs in Asim.