fix attachment scope of rounding functions