Fixed vertical bounds calculations.