Many bugs fixed for extent.