Fixed last sample position being the wrong height