Fixed some aperture calculation bugs