fix function pointer casts
update