Fix define check and function signature