fix function prototypes