fixed some register addressing bugs