Fixed bug with nesting conditionals