Ensuring caps fit properly to pharmaceutical bottles