Fixed bug where last elif would fire even if false