Fixed some address checking