fix undefined function on reading page