last? fix to the checked if, was breaking js