some small bug fixes to TLB generating