clean up output a little for clamping