Issue with foreach being called when no quotes exist