got rid of length -1;

change debugger