fixed erroneous using of isSpilled()