Error out on out of range start or end vertices

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>