fix function call via library