fix compile errors

some declared functions were not defined properly