Added braces in elsif check