Function Selection: fixed crash cause by invalid functions