temp fix for race conditions

Just in case the query to mongoose is slow, the commands won't throw errors trying to use the urls var