add back undefined test
fix typo causing book to not open on initial load