Make sure numSlices doesn't become 0. Refs #83
Use the right variable consistently