Change code to use zero-based coordinates instead of one-based.