Amend crash by add static keyword for callback function.