Fixing bug in paper.java