Fix some scalar addressing bugs