more fixes to the checked if, was breaking js