-1 bug on A*