fix notice messages on function definition and call