Fix elif in function.