I fixed the error i guess temporarily, but now the table header lost its color. All pages in safety module were showing the saem error on loading, I copy pasted the script for  function format from the OK file to all other files and it got fixed...