Fixed syntax error in elsif