Resolved some issues with if elseif structure.