if bug
fixed scope issue with promises
fixed async if issue

if conditions are async, then they were all executed before the if
statement. Now they're only executed if the preceeding condition was not
met