Fixed some addressing bugs