fix bug in isFinal