Fix for secondLength

secondLength was being calculated incorrectly after the previous change, it should be correct now.