fix undefined references error