fix case where console.log has no scope