fix getbufferrange to handle non-zero start