Bugs fixed in base uri and optimizer.