Fix several issues with alignment. We weren't always accounting for type