Fixed bugs in NuStack.java