canAdvance() bug fix