quick bug fix undefined function on page load

sorry didn't test :-1: