fix zero attachment size problem